package com.dissertation.respository;

import com.dissertation.model.Work;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

public interface WorkRepository extends MongoRepository<Work, String> {

    List<Work> findByCategoryTreeNameAndCategoryLeafNameAndDeletedIsFalse(String uniqueName, String categoryLeafName);

    List<Work> findByCategoryTreeNameAndCategoryLeafNameAndDeletedIsFalseAndAuthor(String categoryTreeName,
                                                                        String categoryLeafName,
                                                                        String userName);

}
